Ext.define("core.jbpm.controller.WfDeleteProcessIController", {
	extend : "Ext.app.Controller",
	mixins : {
		gridUtils : "core.utils.GridUtils",
		formUtils : "core.utils.FormUtils"
	},
	init : function() {
		this.control({
			/**
			 * 挂接流程
			 */
			"deleteProcessILayoutForm button[ref=deleteProcessI]" : {
				click : function(btn) {
					var form=Ext.getCmp("deleteProcessILayoutForm");
					var formObj=form.getForm();
					var executionId=formObj.findField('executionId').getValue();
					if(executionId){
						Ext.Ajax.request({
							url : APPBASE + "pc/wfProcessAction!deleteProcess.action",
							params :{'idValue':executionId},
							method : "POST",
							timeout : 4000,
							success : function(response, opts) {
								var resObj = Ext.decode(response.responseText);
								 alert(resObj);
							}
						});
					}
				}
			}
		});
	},
	views : ["core.jbpm.view.DeleteProcessILayout", 
	         "core.jbpm.view.DeleteProcessILayoutForm"],
	         
	stores : ["core.jbpm.store.ProcessStore"],
	models : ["core.jbpm.model.ProcessModel"]
	
});